for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
( function ( mw ) {
modernTimelineLog( 'Timeline script' );
function modernTimelineLog( message ) {
if( mw.config.get( 'debug' ) ) {
console.log( message );
console.log
}
mw.loader.using( [ 'ext.modern.timeline' ] ).done( function () {
modernTimelineLog( 'Loaded timeline JS' );
for( var timelineId in window.modernTimeline ) {
if( window.modernTimeline.hasOwnProperty( timelineId ) ) {
modernTimelineLog( 'Initializing timeline "' + timelineId + '"' );
var timelineJson = window.modernTimeline[timelineId];
new TL.Timeline( timelineId, timelineJson, timelineJson.options );
TL
/** global: TL */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
new TL.Timeline(timeline..., timelineJson.options)
modernTimelineLog( 'Done initializing timeline "' + timelineId + '"' );
} );
}( mediaWiki ) );
mediaWiki
/** global: mediaWiki */